$(document).ready(function () {
    var flagAccount = false;
    var flagPass = false;
    var account = $("#account");
    var password = $("#password");
    var button = $("#button");

    button.click(function () {

        if(password.val()===""){
            password.focus();
        }else {
            flagPass = true;
        }
        if(account.val()===""){
            account.focus();
        }else {
            flagAccount = true;
        }
        if(flagAccount&&flagPass){
            $("form").submit();
        }
    })
});